package offer.secnod;


public class Offer46 {

    int   find(String s){
        char[] chars = s.toCharArray();
        int length = chars.length;
        int[]  dp=new int[length+1];
        dp[0]=1;
        dp[1]=1;
        for (int i = 2; i <=length ; i++) {
            int n=(chars[i-2]-'0')*10+(chars[i-1]-'0');
            if (n>=10&&n<=25){
                dp[i]=dp[i-1]+dp[i-2];
            }else {
                dp[i]=dp[i-1];
            }
        }
        return dp[length];
    }


}
